package v2;


public class Acceleration {
	private double ax;
	private double ay;

	public Acceleration(){
		this.ax = 0;
		this.ay = 0;
	}
	public Acceleration(double ax, double ay){
		this.ax = ax;
		this.ay = ay;
	}
	public void addAcc(double ax, double ay){
		this.ax += ax;
		this.ay += ay;
	}
	
	public double getAccX(){
		return ax;
	}
	public double getAccY(){
		return ay;
	}
	public double getAccNetSq(){
		return ax*ax+ay*ay;
	}
	public double[] toDoubleArr() {
		double[] arr = new double[2];
		arr[0]=ax;
		arr[1]=ay;
		return arr;
	}
}
